package cn.itrip.auth.service;

import cn.itrip.beans.dto.Dto;
import cn.itrip.beans.pojo.ItripUser;
/**
 * Created by Administrator on 2018/11/21.
 */

public interface UserService {
    /**
     * 用户登录
     * @param userCode
     * @param userPassword
     * @param platformname
     * @return
     * @throws Exception
     */
    public Dto selectByLogin(String userCode,String userPassword,String platformname)throws Exception;

    /**
     * 判断该userCode是否已被注册
     * @param userCode
     * @return
     */
    public Dto selectByUserCode(String userCode)throws Exception;

    /**
     * 注销
     * @param token
     * @return
     */
    public Dto logout(String token)throws Exception;

    /**
     * 置换token
     * @param token
     * @return
     */
    public Dto reloadToken(String token)throws Exception;
    /**
     * 邮箱注册
     * @param user
     * @return
     */
    public Dto emailRegedit(ItripUser user) throws Exception;
    /**
     * 手机注册
     * @param user
     * @return
     */
    public Dto phoneRegedit(ItripUser user) throws Exception;

    /**
     * 激活
     * @param userCode
     * @param code
     * @return
     */
    public Dto updateActivated(String userCode, String code) throws Exception;

}
